<template>
  <div class="search">
    <el-button  icon="el-icon-search" @click="dialogVisible = true" type="primary">搜索</el-button>
    <!-- :before-close="handleClose" -->
    <el-dialog
    width="75%"
      title="搜索"
      :visible.sync="dialogVisible"
      
      append-to-body
    >
      <!-- <el-tabs v-model="activeName" @tab-click="handleClick"> -->
        <el-tabs v-model="activeName"> 
        <el-tab-pane label="主体搜索" name="first"><querySubject /></el-tab-pane>
        <el-tab-pane label="图斑搜索" name="second"><PlotSearch /></el-tab-pane>
      </el-tabs>
    </el-dialog>
  </div>
</template>

<script>
  
import PlotSearch from "./PlotSearch/PlotSearch";
export default {
  name: "Search",
  data() {
    return {
      dialogVisible: false,
      dataIndex: 0,
      activeName: "first",
    };
  },
  components: {
    PlotSearch,
    querySubject:()=>import('./querySubject/querySubject.vue')
  },
  methods: {
    // handleClose(done) {
    //   this.$confirm("确认关闭？")
    //     .then(() => {
    //       done();
    //     })
    //     .catch(() => {});
    // },
    handleClick(tab, event) {
      console.log(tab, event);
    },
  },
};
</script>

<style lang="scss">
.search {
  position: absolute;
  z-index: 200;
  right: 10px;
  top: 10px;

  .el-dialog {
    .el-dialog-header {
      padding: 0;
    }
    // .el-dialog-body {
    //   padding: 0 20px 10px;
    // }
  }
}
</style>



